package com.app.utils.util;

import android.content.Context;

import com.app.utils.util.view.expression.ExpressionUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by xuxinghai on 2016/7/7.
 * 用于这个工具库的一些数据配置,方便引用项目配置
 */
public class AppUtils {

    private static AppUtils instance;
    private static Context context;
    private boolean mDebug;



    private AppUtils() {

    }

    public static AppUtils getInstance() {
        if (instance == null) {
            instance = new AppUtils();
        }
        return instance;
    }


    public Context getContext() {
        return context;
    }

    public void setContext(Context context) {
        this.context = context;
    }

    public boolean ismDebug() {
        return mDebug;
    }

    public void setmDebug(boolean mDebug) {
        this.mDebug = mDebug;
        if(mDebug){
            ToastUtils.showText("debug模式");
        }
    }

    /**
     * 添加表情
     * @param map
     */
    public void addExpresstion(Map<String,Integer> map){
        if(ExpressionUtil.name_image_res == null){
            ExpressionUtil.name_image_res = new HashMap<String, Integer>();
        }
        ExpressionUtil.name_image_res.putAll(map);
    }
}
